<template>
  <div>
    <BasicModal
      v-bind="$attrs"
      title="新建任务"
      @register="register"
      :destroyOnClose="true"
      :minHeight="600"
      :width="700"
    >
      <BasicForm @register="registerForm" />
    </BasicModal>
  </div>
</template>
<script lang="ts" setup>
  import { BasicModal, useModal } from '/@/components/Modal';
  import { BasicForm, useForm } from '/@/components/Form';
  import { getAddTask } from './tableData';
  // 定义弹窗是否可见
  const [register] = useModal();
  const [registerForm] = useForm({
    labelCol: { span: 24 },
    wrapperCol: { span: 24 },
    schemas: getAddTask(),
    fieldMapToTime: [['planTime', ['starttime', 'endtime'], 'YYYY-MM-DD']],
    showResetButton: false,
    showSubmitButton: false,
  });
</script>
<style lang="less" scoped>
  ::v-deep(.rc-virtual-list-scrollbar-thumb) {
    visibility: hidden !important;
  }

  ::v-deep(.ant-calendar-picker) {
    width: 100% !important;
  }
</style>
